package com.meijin.spring6.resource.service;

import com.meijin.spring6.resource.dao.TeacherDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author meijindeng
 * @Data 2023-09-03 18:38
 * @Description TeacherServiceImpl
 * @Version 1.0
 */
@Service
public class TeacherServiceImpl implements TeacherService {

    //第二种：不指定名称，根据属性名称注入。
    @Resource
    private TeacherDao myTeacherDao;

    @Override
    public void add() {
        System.out.println("service add方法执行了。。。");
        myTeacherDao.add();
    }
}
